//
//  LotteryInformationTableViewCell.m
//  PlayerWorld
//
//  Created by 1 on 16/5/3.
//  Copyright © 2016年 刘成. All rights reserved.
//
#define UISCREEN_WIDTH  [UIScreen mainScreen].bounds.size.width
#define UISCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height

#import "LotteryInformationTableViewCell.h"

@implementation LotteryInformationTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 开奖标题
        self.lotteryTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 10, 80, 20)];
        self.lotteryTitleLabel.font = [UIFont systemFontOfSize:16];
        self.lotteryTitleLabel.text = @"重庆时时彩";
        self.lotteryTitleLabel.textColor = [UIColor blackColor];
        [self.contentView addSubview:self.lotteryTitleLabel];
        
        // 开奖期数
        UILabel *lotteryNnumberLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.lotteryTitleLabel.frame)+10, 10, UISCREEN_WIDTH-10-self.lotteryTitleLabel.frame.size.width-5, 20)];
        lotteryNnumberLabel.font = [UIFont systemFontOfSize:12];
//        lotteryNnumberLabel.text = @"第20160825-023期";
        lotteryNnumberLabel.textColor = [UIColor grayColor];
        [self.contentView addSubview:lotteryNnumberLabel];
        
//        // 开奖数字图片
//        UIButton *lotteryNumber1Button = [[UIButton alloc] initWithFrame:CGRectMake(20, CGRectGetMaxY(self.lotteryTitleLabel.frame)+10, 40, 40)];
//        [lotteryNumber1Button setBackgroundImage:[UIImage imageNamed:@"icon_ball_cyan"] forState:UIControlStateNormal];
//        [lotteryNumber1Button setTitle:@"1" forState:UIControlStateNormal];
//        [self.contentView addSubview:lotteryNumber1Button];
//        
//        UIButton *lotteryNumber2Button = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(lotteryNumber1Button.frame)+5, CGRectGetMaxY(self.lotteryTitleLabel.frame)+10, 40, 40)];
//        [lotteryNumber2Button setBackgroundImage:[UIImage imageNamed:@"icon_ball_cyan"] forState:UIControlStateNormal];
//        [lotteryNumber2Button setTitle:@"2" forState:UIControlStateNormal];
//        [self.contentView addSubview:lotteryNumber2Button];
//        
//        UIButton *lotteryNumber3Button = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(lotteryNumber2Button.frame)+5, CGRectGetMaxY(self.lotteryTitleLabel.frame)+10, 40, 40)];
//        [lotteryNumber3Button setBackgroundImage:[UIImage imageNamed:@"icon_ball_cyan"] forState:UIControlStateNormal];
//        [lotteryNumber3Button setTitle:@"3" forState:UIControlStateNormal];
//        [self.contentView addSubview:lotteryNumber3Button];
//        
//        UIButton *lotteryNumber4Button = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(lotteryNumber3Button.frame)+5, CGRectGetMaxY(self.lotteryTitleLabel.frame)+10, 40, 40)];
//        [lotteryNumber4Button setBackgroundImage:[UIImage imageNamed:@"icon_ball_cyan"] forState:UIControlStateNormal];
//        [lotteryNumber4Button setTitle:@"4" forState:UIControlStateNormal];
//        [self.contentView addSubview:lotteryNumber4Button];
//        
//        UIButton *lotteryNumber5Button = [[UIButton alloc] initWithFrame:CGRectMake(CGRectGetMaxX(lotteryNumber4Button.frame)+5, CGRectGetMaxY(self.lotteryTitleLabel.frame)+10, 40, 40)];
//        [lotteryNumber5Button setBackgroundImage:[UIImage imageNamed:@"icon_ball_cyan"] forState:UIControlStateNormal];
//        [lotteryNumber5Button setTitle:@"5" forState:UIControlStateNormal];
//        [self.contentView addSubview:lotteryNumber5Button];
        
        
        // 开奖详情
        UIImageView *lotteryDetailsImageView = [[UIImageView alloc] initWithFrame:CGRectMake(UISCREEN_WIDTH-15-10,  (60-30)/2, 15, 30)];
        [lotteryDetailsImageView setImage:[UIImage imageNamed:@"icon_arrow"]];
        [self.contentView addSubview:lotteryDetailsImageView];
 
    }
    return self;
}

@end
